package com.example.dddsample.application.assembler;

import com.example.dddsample.application.api.request.KafkaRequestDTO;
import com.example.dddsample.application.assembler.mapper.KafkaRequestDTOMapper;
import com.example.dddsample.domain.entity.KafkaAggregate;
import org.springframework.stereotype.Component;

/**
 * @author: bebm
 * @date: 2022/4/6 17:08
 * @description:
 */
@Component
public class KafkaRequestDTOAssembler {

    /**
     * assemblerFromKafkaRequestDTO
     * @param kafkaRequestDTO kafkaRequestDTO
     * @return KafkaAggregate
     */
    public KafkaAggregate assemblerFromKafkaRequestDTO(KafkaRequestDTO kafkaRequestDTO){
        return KafkaRequestDTOMapper.INST.fromKafkaRequestDTO(kafkaRequestDTO);
    }
}
